﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using log4net;
using RealState.BLL;

namespace RealState.W.AdminControl
{
    public partial class TradeTypeL : System.Web.UI.UserControl
    {
        private TradeTypesBLL m_TradeTypeBLL;
        protected ILog log = LogManager.GetLogger(typeof(TradeTypeL));
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                loadData();
            }
        }

        private void loadData()
        {
            m_TradeTypeBLL = new TradeTypesBLL();
            try
            {
                rptCategories.DataSource = m_TradeTypeBLL.GetTradeTypess();
                rptCategories.DataBind();
            }
            catch (Exception ex)
            {
                log.Error(ex.Message);
            }
            finally
            {
                m_TradeTypeBLL = null;
            }
        }
    }
}